/* 
 * File:   RoomBooking.h
 * Author: abhi
 *
 * Created on February 9, 2012, 12:23 PM
 */

#ifndef ROOMBOOKING_H
#define	ROOMBOOKING_H

#include "Room.h"
#include <time.h>

#ifdef	__cplusplus
extern "C" {
#endif
    
    int RoomBookingCount;
    
    /* stores global info related to room booking */
    typedef struct room_meta_data_t {
        double rate;
    } RoomMetaData;

    /* instance of booked room */
    typedef struct room_booking_t {
        int id;
        Room* room;
        time_t checkInDate;
        time_t checkOutDate;
        time_t reservationDate;
        time_t cancellationDate;
        double totalAmount;
        double paid;
    } RoomBooking;
    
    RoomBooking* getRoomBookingWithID(RoomBooking** roomBookingArr, int roomBookingID);
    
    int checkIn(int roomBookingID);
    int checkOut(int roomBookingID);
    int doBooking(int customerID, int roomBookingID);
    int cancelBooking(int customerID, int roomBookingID);
    
    FILE* createRoomBookingFile(void);
    int removeRoomBookingFile(FILE* fp);


#ifdef	__cplusplus
}
#endif

#endif	/* ROOMBOOKING_H */

